﻿<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <SnippetTypes>
        <SnippetType>Expansion</SnippetType>
      </SnippetTypes>
      <Title>ORDGetSuperNames</Title>
      <Author>innovoCAD</Author>
      <Description>Code snippet for getting SuperElevationSections string name list.</Description>
      <HelpUrl>
      </HelpUrl>
      <Shortcut>ORDGetSuperNames</Shortcut>
    </Header>
    <Snippet>
	     <References>
        <Reference>
          <Assembly>Bentley.CifNET.GeometryModel.SDK.4.0</Assembly>
        </Reference>
      </References>
      <Imports>
	  <Import>
          <Namespace>System.Collections.Generic</Namespace>
        </Import>
        <Import>
          <Namespace>SDK = Bentley.CifNET.GeometryModel.SDK</Namespace>
        </Import>
      </Imports>
      <Code Language="vb" Delimiter="$"><![CDATA[    ''' <summary>Get SuperElevationSections string name list.</summary>
    Private ReadOnly Property GetSuperElevationSections As List(Of String)
        Get
            Dim SuperNames As List(Of String) = New List(Of String)()

            'Checking for Active SDK connection and SuperElevationSections nullification
            If SDKCon.GetActive() Is Nothing Or SDKCon.GetActive().SuperElevationSections Is Nothing Then
                SuperNames.Add("None")
            Else
                For Each superElevationSection As SDK.SuperElevationSection In SDKCon.GetActive().SuperElevationSections
                    If Not String.IsNullOrEmpty(superElevationSection.Name) Then SuperNames.Add(superElevationSection.Name)
                Next
            End If

            SuperNames.Sort()
            Return SuperNames
        End Get
    End Property
]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>